FROM openjdk:8-jdk-alpine
MAINTAINER tong.li lt_alex@163.com
VOLUME /tmp
ADD build/libs/pureland-boot-sample-1.0.RELEASE.jar pureland-boot-sample.jar
#ENV MYSQL_ADDR=127.0.0.1
#ENV MYSQL_USER=root
#ENV MYSQL_PASSWD=123456
#ENV MYSQL_DBNAME=pureland_cloud_demo
#ENV MYSQL_PORT=3306
#ENV REDIS_ADDR=127.0.0.1
#ENV REDIS_PASSWD=123456
#ENV REDIS_PORT=6379
#ENV NACOS_ADDR=127.0.0.1
#ENV NACOS_PORT=8848
#ENV PROFILES="dev"

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom -Xmx200m -Xms200m","-jar","pureland-boot-sample.jar"]

#ENTRYPOINT ["sh","-c","java -jar pureland-boot-sample.jar \
#--spring.profiles.active=$PROFILES \
#--spring.datasource.username=$MYSQL_USER \
#--spring.datasource.password=$MYSQL_PASSWD \
#--spring.datasource.url='jdbc:mysql://test-plat-mysql-server:3306/pureland_cloud_demo?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true' \
#--spring.redis.port=$REDIS_PORT \
#--spring.redis.host=$REDIS_ADDR --spring.redis.password=$REDIS_PASSWD \
#--nacos.server-addr=$NACOS_ADDR:$NACOS_PORT \
#--nacos.username=$NACOS_USER \
#--nacos.password=$NACOS_PASSWD"\
#]

EXPOSE 8080